<?php
namespace Dybasedev\Dataman\Capsule;

use Illuminate\Database\Capsule\Manager as Capsule;
use Illuminate\Database\DatabaseManager;
use Dybasedev\Dataman\Connectors\ConnectionFactory;

class Manager extends Capsule
{
    protected function setupManager()
    {
        $factory = new ConnectionFactory($this->container);

        $this->manager = new DatabaseManager($this->container, $factory);
    }

    public static function convert($connection = null)
    {
        return static::$instance->connection($connection)->getConvertBuilder();
    }
}